/*
 * 2005-12-26 lxm 创建。 
 */
package com.hd123.rumba.organization;

import com.hd123.rumba.exception.BusinessException;
import com.hd123.rumba.runtime.IBaseEntity;
import com.hd123.rumba.util.HashMap2;

/**
 * 组织角色 | 实体 | 接口类
 * <p>
 * 
 * BK = organization + IOrgRole.class，即对于一个组织不能同时拥有两个以上相同类型的角色。
 * <p>
 * 
 * 这是一个抽象概念，未来将通过继承成为具体的组织角色，例如：总部、门店、供应商、客户等等。
 * <p>
 * 
 * 与<code>IOrganization</code>的状态分别控制。但对于一个组织角色而言，只有当其所属的组织的状<br>
 * 态<code>!=IOrganization.VALUE_STATE_DELETED</code>且其本身的状态<code>!=VALUE_STATE_DELETED</code><br>
 * 时可以被使用。
 * <p>
 * 
 * @author lxm
 * 
 */
public interface IOrgRole extends IBaseEntity {

  /** @deprecated */
  public static String CAPTION_CLASS = COrgRole.CAPTION_CLASS;
  /** @deprecated */
  public static Integer VALUE_STATE_USING = COrgRole.VALUE_STATE_USING;
  /** @deprecated */
  public static String CAPTION_STATE_USING = COrgRole.CAPTION_STATE_USING;
  /** @deprecated */
  public static Integer VALUE_STATE_DELETED = COrgRole.VALUE_STATE_DELETED;
  /** @deprecated */
  public static String CAPTION_STATE_DELETED = COrgRole.CAPTION_STATE_DELETED;
  /** @deprecated */
  public static HashMap2 STATEMAP = COrgRole.STATEMAP;
  /** @deprecated */
  public static String CAPTION_TYPE = COrgRole.CAPTION_TYPE;
  /** @deprecated */
  public static Integer VALUE_TYPE_INTERNAL = COrgRole.VALUE_TYPE_INTERNAL;
  /** @deprecated */
  public static String CAPTION_TYPE_INTERNAL = COrgRole.CAPTION_TYPE_INTERNAL;
  /** @deprecated */
  public static Integer VALUE_TYPE_EXTERNAL = COrgRole.VALUE_TYPE_EXTERNAL;
  /** @deprecated */
  public static String CAPTION_TYPE_EXTERNAL = COrgRole.CAPTION_TYPE_EXTERNAL;
  /** @deprecated */
  public static HashMap2 TYPEMAP = COrgRole.TYPEMAP;
  /** @deprecated */
  public static String CAPTION_ORGANIZATION = COrgRole.CAPTION_ORGANIZATION;

  /**
   * 取得类的中文标题CAPTION_CLASS。
   * 
   * @return
   */
  public String getClassCaption();

  /** 类型 */
  public Integer getType() throws BusinessException;

  public void setType(Integer type) throws BusinessException;

  /** 所修饰的组织 */
  public IOrganization getOrganization() throws BusinessException;

  public void setOrganization(IOrganization organization) throws BusinessException;

}
